package com.google.code.virtualhockey.vhx.client.srvcom;

import java.util.HashMap;

/** A command that is dispatched using a CommandDispatcher. */
public class Command {
  private final String                  m_strName;
  private final HashMap<String, String> m_mapParams = new HashMap<String, String>();

  /**
   * Creates a new command with the given name.
   *
   * @param strName the name of this Command.
   */
  public Command( String strName ) {
    m_strName = strName;
  }

  /**
   * Adds a parameter to this command.
   *
   * @param strName  the parameter name
   * @param strValue the parameter value
   */
  public void addParameter( String strName, String strValue ) {
    m_mapParams.put( strName, strValue );
  }

  public String getName() {
    return m_strName;
  }

  public String getParameter( String strName ){
    return m_mapParams.get( strName );
  }

  HashMap<String,String> getParamters() {
    return m_mapParams;
  }
}
